package hn.cch.test.controller;

import hn.cch.test.configuration.LazyConfiguration;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Lazy;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@Lazy
@RequestMapping(value = "lazy")
@RestController
public class LazyController {

    private final static Logger logger = LoggerFactory.getLogger(LazyController.class);


    @Autowired
    private LazyConfiguration lazyConfiguration;

    @GetMapping(value = "get")
    public String get() {
        lazyConfiguration.get();
        return "OK";

    }

}
